package cn.sanshuilin.kst.system.provider.bean;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author greenlee
 * @version v1.0
 * @create 创建时间: 2017-12-03 18:31
 * Copyright 2017  by 三水林科技有限公司
 **/
@Entity
@Table(name = "Groupmenu")
public class GroupMenu implements Serializable {
    private int id;
    private String menuIDs;

    @Id
    @Column(name = "ID", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "MenuIDs", nullable = true, length = -1)
    public String getMenuIDs() {
        return menuIDs;
    }

    public void setMenuIDs(String menuIDs) {
        this.menuIDs = menuIDs;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        GroupMenu that = (GroupMenu) o;

        if (id != that.id) return false;
        if (menuIDs != null ? !menuIDs.equals(that.menuIDs) : that.menuIDs != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (menuIDs != null ? menuIDs.hashCode() : 0);
        return result;
    }
}
